package org.linlinjava.litemall.admin.controller.charge;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.linlinjava.litemall.admin.service.AdminChargeService;
import org.linlinjava.litemall.admin.vo.charge.ChargeReqVO;
import org.linlinjava.litemall.core.util.ResponseUtil;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags="充值统计")
@Validated
@RestController
@RequestMapping("/admin/charge-statistics")
@RequiredArgsConstructor
public class AdminChargeController extends ResponseUtil {

    private final AdminChargeService adminChargeService;

    @ApiOperation("充值管理总")
    @PostMapping("summary")
    public Response summary(@RequestBody ChargeReqVO reqVO){
        return adminChargeService.getTotalChargeSummary(reqVO);
    }


    @ApiOperation("充值管理列表")
    @PostMapping("list")
    public Response list(@RequestBody ChargeReqVO reqVO){
        return adminChargeService.getChargeList(reqVO);
    }

    @ApiOperation("总部充值管理列表")
    @PostMapping("hq-list")
    public Response HQlist(){
        return adminChargeService.getHQChargeList();
    }

    @ApiOperation("充值管理列表 门店")
    @PostMapping("shop-list")
    public Response shopList(@RequestBody ChargeReqVO reqVO){
        return adminChargeService.getShopChargeList(reqVO);
    }


}
